<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>
		<?php __('Auction-this'); ?>
		<?php echo $title_for_layout; ?>	
	</title>
	<?php
		echo $html->charset();
	
		echo $html->meta('icon');

		echo $html->css('cake.generic');
		echo $html->css('color-grey');

		echo $scripts_for_layout;
	?>
</head>
<body class="home blog col-3 loggedin">
<div id="page">

  <div class="shadow-left page-content header-wrapper">
		<div class="shadow-right">
			<div id="header" class="bubbleTrigger">
				<a href="http://localhost/canastro/bidaki/sales/index">
						
						
				<span id="site-title">
						
				</span>
				</a>  
				
				<ul id="navigation">
					<li id="nav-home" class = 
						<?php 
						if(strcmp($title_for_layout,'View auctions') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
							<?php	echo $html->link(__('Home', true), '/sales/index'); ?>
						</span><span class="pointer"></span>
					</li>
					
					<li  class = 
						<?php 
						if(strcmp($title_for_layout,'Following') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
						<?php	echo $html->link(__('Following', true), '/follows/index'); ?>
						</span><span class="pointer"></span>
					</li>

							
					<li  class = 
						<?php 
						if(strcmp($title_for_layout,'View closed auctions') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
					
						<?php 	
						echo $html->link(__('Closed Auctions', true), '/sales/index_closed'); ?>
						</span><span class="pointer"></span>
					</li>
					
					<li class=<?php 
						
						if(strcmp($title_for_layout,'All items') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
						<?php echo $html->link(__('All items', true), '/items/'); ?>
						</span><span class="pointer"></span>
					</li>
					
					<li class=<?php 
						if(strcmp($title_for_layout,'Faq') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
						<?php	echo $html->link(__('FAQ', true), '/pages/faq'); ?>
						</span><span class="pointer"></span>
					</li>
					
					<li class=<?php 
						if(strcmp($title_for_layout,'Admin') == 0) 
							echo "current_page_item";  
						else 
							echo "page_item";  ?>
						>
						<span class="title">
						<?php	if($Admin) 
							echo $html->link(__('Admin Panel', true), '/pages/admin'); 
						?>
						</span><span class="pointer"></span>
					</li>
				</ul>
			</div>

		</div>

	</div>
	<div class="shadow-left page-content main-wrapper">
		<div class="shadow-right">
			<div id="main">
				<div id="main-inside" class="clearfix">
					<div id="primary-content">		
						<?php
						   $session->flash();
						   $session->flash('auth');
						?>

						<?php echo $content_for_layout; ?>
					</div>
					
					<!-- 2nd sidebar -->
					<div id="sidebar2">
						<ul class="sidebar-blocks">
							
									<?php
									echo '<br>';
									echo $html->link($html->image('flags/gb.png'),array('controller'=>'lang','action'=>'eng'),array('escape' => false));	
									echo ' ';
									echo $html->link($html->image('flags/es.png'),array('controller'=>'lang','action'=>'spa'),array('escape' => false));
									echo ' ';
									echo $html->link($html->image('flags/pt.png'),array('controller'=>'lang','action'=>'por'),array('escape' => false));
									?>
							
							<li class="block">
								<?php 	if($Auth)
								{ ?>
									<div class="block-login clearfix" id="instance-loginwidget-3">
										<h3 class="title"><span>Logged in: <?php echo $Auth['User']['login'] ?>
										</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>        
										<div class="clearfix">
											<ul class="alignleft">
												<li>
												<?php echo $html->link(__('Profile', true), '/users/profile_infos');?>
												</li>
												<li>
													<?php echo $html->link(__('Logout', true), '/users/logout');?></li>
												<li>
													<?php echo __('Licitations avaiable: '.$Auth['User']['nrLicitations']);?>
												</li>
												<span class = "buttonspan clearfix">
													<?php echo $html->link(__('Buy Licitations', true), array('controller'=>'users', 'action' => 'buy_licitations'), array('class'=>'buttonref')); ?>
												</span>
											</ul>
	
										</div>
									</div>
								<?php } else { ?>
									<div class="block-login clearfix" id="instance-loginwidget-3">
										<h3 class="title"><span>Login:
										</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>        
										<div class="clearfix">
											<ul class="alignleft">
												<?php
												echo $form->create(__('User',true), array('action' => 'login'));
												?>
												<li>
													<?php
													echo $form->input(__('login',true),array('between'=>'<br>','class'=>'text'));
													?>
												</li>
												<li>
												<?php
													echo $form->input(__('password',true),array('between'=>'<br>','class'=>'text'));
													?>
												</li>
													

													<button type="submit" class="loginSubmit">Sign In</button>
													 <?php echo $form->end(); ?>
										
											<span class = "buttonspan clearfix">
												<?php echo $html->link(__('Signup', true), array('controller'=>'users', 'action' => 'add'), array('class'=>'buttonref')); ?>
											</span>
											
											<br><br>
											</ul>
								
										</div>
										
									</div>
								<?php } ?>
							</li>
							<li class="block">
									<div class="block-login clearfix" id="instance-loginwidget-3">
										<h3 class="title"><span> <?php __('How it works'); ?>
										</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>        
										<div class="clearfix">
											<ul class="alignleft">
												<li>
													Buy bids (bids cost 0.45 GBP each)
												</li>
												<li>
													Place bid and raise the price
												</li>
												<li>
													Wait for time to reach zero
												</li>
												<li>
													Win the auction and buy at a bargain -OR- buy at regular price and receive the value of all your placed bids back
												</li>
											</ul>
	
										</div>
									</div>
								</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>



</div>
</body>
</html>